<?php

my_component_load('restore_database');
if(!is_admin())fatal_error('Akses ditolak');
 
$task = isset($_GET['task']) ? $_GET['task'] : ""; 
$file_sql_backup = isset($_GET['filesql']) ? $_GET['filesql'] : '';
$database 	= isset( $_GET['id'] ) ? $_GET['id']:  0;
$modulname 	= "Administrator _BN_ HR Database _BN_ Restore";
if($task == 'delete_file'){  
	delete_file_backup( $file_sql_backup );
	my_direct($_SERVER['HTTP_REFERER']);
}elseif($task == 'restore_database'){ 
	restore_execution( $file_sql_backup );
}else{
	$content 	= list_database_to_restore();
}
generate_my_web($content, $modulname  );